﻿@{Layout = "~/Views/Shared/_Layout.cshtml";}
@using Scheduling.Models

<p class="Subtitle">My booking requests</p>
<table class="Table" cellspacing="0">
    <tr>
        <th>Booker</th>
        <th>Course Instance ID</th>
        <th>Year</th>
        <th>Period</th>
    </tr>
    @{foreach (var bookingRequest in ViewData.Model)
      {
            <tr onclick="location.href='@Href("~/BookingRequest/Show/" + bookingRequest.ID)'" class="Clickable">
                <td style="width:80px;">
                    @bookingRequest.Booker.ID
                </td>
                <td style="width:110px;">
                    @bookingRequest.CourseInstance.ID
                </td>
                <td style="width:80px;">
                    @bookingRequest.Year
                </td>
                <td style="width:80px;">
                    @bookingRequest.StartPeriod
                </td>
                <td style="width:80px;">
                    @Html.ActionLink("Edit", "Edit", new { Id = bookingRequest.ID })
                </td>
                <td style="width:80px;">
                    @Html.ActionLink("Delete", "Delete",new { Id = bookingRequest.ID })
                </td>

            </tr>
      }
    }
</table>
@Html.ActionLink("Add Booking Request", "Add")